package cc.wubo.jpa.repository;

import javax.persistence.LockModeType;

import org.springframework.data.jpa.repository.Lock;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;

import cc.wubo.jpa.entity.User;

public interface UserRepository extends CrudRepository<User, Integer>{
	@Transactional
	@Lock(LockModeType.PESSIMISTIC_READ)
	public User getById(Integer id);
}
